<?php

namespace App\Http\Controllers\H5;

use App\Http\Controllers\Controller;
use App\Models\PostItem;
use Illuminate\Http\Request;

class PostController extends BaseController
{
    public function detail(Request $request, $aid)
    {
        $post = PostItem::findOrFail($aid);
        $post->increment('views');
        $post->load(['user', 'content', 'images', 'media']);

        return $this->view('h5.post.detail', compact('post'));
    }
}
